import http from '@/design/libs/request/request'

const BASE_URL = '/plugins/questionnaire/new'
export default {
  // 获取列表数据
  list: data => http.post(BASE_URL + '/list', data),
  // 创建数据
  create: data => http.post(BASE_URL + '/create', data),
  // 更新数据
  update: data => http.post(BASE_URL + '/update', data),
  // 删除单个
  delete: (id) => http.post(BASE_URL + '/delete/' + id),
  // 删除集合
  del: data => http.post(BASE_URL + '/delete', data),
  // 创建/更新题目
  createDesign: (id, data) => http.post(BASE_URL + '/createDesign/' + id, data),
  // 题目集合
  queryAllByQuestionnaireId: (id) => http.post(BASE_URL + '/queryAllByQuestionnaireId/' + id),
  // 删除单个题目
  deleteByIdDesign: (id) => http.post(BASE_URL + '/deleteByIdDesign/' + id),
  // 问卷提交数据
  recycleList: data => http.post(BASE_URL + '/recycle/list', data),
  // 问卷分析
  recyleQuestionnaireAnalysis: data => http.post(BASE_URL + '/recycle/questionnaireAnalysis', data),
  // 年度分析
  analysisMonthly: data => http.post(BASE_URL + '/recycle/analysisMonthly', data)
}
